package com.mls.education.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.mls.education.mapper.EduCourseMapper;
import com.mls.education.domain.EduCourse;
import com.mls.education.service.IEduCourseService;
import com.mls.common.core.text.Convert;

/**
 * 课程信息Service业务层处理
 * 
 * @author admin
 * @date 2022-02-19
 */
@Service
public class EduCourseServiceImpl implements IEduCourseService 
{
    @Autowired
    private EduCourseMapper eduCourseMapper;

    /**
     * 查询课程信息
     * 
     * @param id 课程信息主键
     * @return 课程信息
     */
    @Override
    public EduCourse selectEduCourseById(Integer id)
    {
        return eduCourseMapper.selectEduCourseById(id);
    }

    /**
     * 查询课程信息列表
     * 
     * @param eduCourse 课程信息
     * @return 课程信息
     */
    @Override
    public List<EduCourse> selectEduCourseList(EduCourse eduCourse)
    {
        return eduCourseMapper.selectEduCourseList(eduCourse);
    }

    /**
     * 新增课程信息
     * 
     * @param eduCourse 课程信息
     * @return 结果
     */
    @Override
    public int insertEduCourse(EduCourse eduCourse)
    {
        return eduCourseMapper.insertEduCourse(eduCourse);
    }

    /**
     * 修改课程信息
     * 
     * @param eduCourse 课程信息
     * @return 结果
     */
    @Override
    public int updateEduCourse(EduCourse eduCourse)
    {
        return eduCourseMapper.updateEduCourse(eduCourse);
    }

    /**
     * 批量删除课程信息
     * 
     * @param ids 需要删除的课程信息主键
     * @return 结果
     */
    @Override
    public int deleteEduCourseByIds(String ids)
    {
        return eduCourseMapper.deleteEduCourseByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除课程信息信息
     * 
     * @param id 课程信息主键
     * @return 结果
     */
    @Override
    public int deleteEduCourseById(Integer id)
    {
        return eduCourseMapper.deleteEduCourseById(id);
    }
}
